package com.nervenets.web.controller.handler.admin.news;

import com.nervenets.web.annotation.NeedValidation;
import com.nervenets.web.controller.handler.common.TokenParams;
import com.nervenets.web.enumeration.NewsType;
import com.nervenets.web.validation.Type;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
public class NewsEditParams extends TokenParams {
    @NeedValidation(type = Type.NUMBER, description = "资讯ID，不填为新建")
    private int newsId;
    @NeedValidation(type = Type.NOTEMPTY, description = "资讯分类")
    private NewsType newsType;
    @NeedValidation(type = Type.NOTEMPTY, description = "标题")
    private String title;
    @NeedValidation(type = Type.NOTEMPTY, description = "资讯内容")
    private String content;
    @NeedValidation(type = Type.NOTEMPTY, description = "资讯来源")
    private String source;
    @NeedValidation(type = Type.EMPTY, description = "资讯大封面图URL")
    private String bigCoverImage;
    @NeedValidation(type = Type.EMPTY, description = "资讯小封面图URL")
    private String smallCoverImage;
    @NeedValidation(type = Type.NOTEMPTY, description = "是否为热门")
    private boolean hot;
    @NeedValidation(type = Type.NUMBER, description = "排序，值越大越靠前")
    private int queue;
}
